home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6645 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  855 b 

  1. Path: odin.visigenic.com!news
  2. From: Tim O'Neil <toneil@visigenic.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: && operator question
  5. Date: Thu, 15 Feb 1996 13:01:52 +0000
  6. Organization: Visigenic Software, Inc.
  7. Message-ID: <31232EC0.3CD@visigenic.com>
  8. References: <4fu69a$b7e@sphinx.Gsu.EDU> <4fuet4$b3r@niktow.canisius.edu>
  9. NNTP-Posting-Host: vsi48.visigenic.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (WinNT; I)
  14.  
  15. Alan Duchan wrote:
  16. > An ANSI conforming compiler will not evaluate expression2 when expression1
  17. > is false.  Similarly, for
  18. >       expr1 || expr2
  19. > when expr1 is true, expr2 will not be evaluated.
  20.  
  21. Whoops. I guess my solution isn't the way to write the 
  22. evaluation (unless you want that effect.) What would be
  23. the effect of writing it:
  24.  
  25. ((exp1) || (exp2)) stamt;?
  26.